ci: add ABI↔FFI conformance gate#41
Merged
Merged
Conversation
Adds scripts/abi-ffi-gate.py (fails on a declared ABI C function with no Zig export, a mismatched result-code map, or an unrendered template token) and a .github/workflows/abi-ffi-gate.yml that runs it plus a Zig 0.14.0 build/test of the FFI. The Idris2 ABI is the source of truth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ABI↔FFI conformance gate
Adds a CI gate enforcing that the Zig FFI (
src/interface/ffi) conforms to the Idris2 ABI (src/interface/abi— the source of truth):scripts/abi-ffi-gate.py— fails (exit 1) if a declared%foreign "C:<name>"symbol (across all ABI.idrfiles) has noexport fnin the Zig, if the ZigResult = enum(c_int)and IdrisresultToIntdisagree on names or values, or if an unrendered{{...}}template token remains. No toolchain required..github/workflows/abi-ffi-gate.yml— runs the gate, plus builds + tests the FFI under the pinned Zig 0.14.0.Verified non-vacuous and green on this repo (whose FFI was implemented earlier this session). Part of the family-wide rollout.
CI note
rust-ci / Hypatia / governance reds are pre-existing estate-infra unrelated to this change.
🤖 Generated with Claude Code
https://claude.ai/code/session_019xMKB3T4Vo5FYC7Czx3JSH
Generated by Claude Code